Namespace:
System.Collections.Concurrent
Assembly:
System.Threading (in System.Threading.dll)
Syntax
| Visual Basic (Declaration) |
|---|
Sub CopyTo ( _
array As T(), _
index As Integer _
) |
| C# |
|---|
void CopyTo(
T[] array,
int index
) |
Parameters
- array
- Type: array<
T
>[]()[]
The one-dimensional Array that is the destination of
the elements copied from the IProducerConsumerCollection<(Of <(T>)>).
The array must have zero-based indexing.
- index
- Type: System..::.Int32
The zero-based index in array at which copying
begins.
Exceptions
| Exception | Condition |
|---|
| System..::.ArgumentNullException | array is a null reference (Nothing in
Visual Basic). |
| System..::.ArgumentOutOfRangeException | index is less than
zero. |
| System..::.ArgumentException | index is equal to or greater than the
length of the array
-or- The number of elements in the source ConcurrentQueue<(Of <(T>)>) is greater than the
available space from index to the end of the destination array.
|
See Also